import { createRouter, createWebHistory } from "vue-router";
import { baseRoute as routes } from "./config.js";

export default createRouter({
  history: createWebHistory(),
  routes,
  beforeEach: (to, from, next) => {
    console.log("???? to: ", to);

    if (to.meta?.whiteList) {
      next();
    } else {
      next("/login");
    }
  },
});
